package com.itheima.service.sms;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.result.PageResult;
import com.itheima.result.ResultData;
import com.itheima.vo.sms.SmsFlashPromotionProductRelation;

import java.util.List;

public interface FlashPromotionProductRelationService extends IService<SmsFlashPromotionProductRelation> {
    /**
     * 批量选择商品添加关联
     * @param relations
     * @return
     */
    ResultData create(List<SmsFlashPromotionProductRelation> relations);

    /**
     * 删除关联
     * @param id
     * @return
     */
    int delete(Long id);

    /**
     * 分页查询不同场次关联及商品信息
     * @param pageNum
     * @param pageSize
     * @param flashPromotionId
     * @param flashPromotionSessionId
     * @return
     */
    PageResult seleteAll(Long pageNum, Long pageSize, Long flashPromotionId, Long flashPromotionSessionId);

    /**
     * 修改关联信息
     * @param smsFlashPromotionProductRelation
     * @return
     */
    int updateRelation(Long id, SmsFlashPromotionProductRelation smsFlashPromotionProductRelation);

    /**
     * 获取管理商品促销信息
     * @param id
     * @return
     */
    SmsFlashPromotionProductRelation get(Long id);
}
